<?php
	$current_date	= date("Y-m-d", time());
?>
<script type="text/javascript">
$(document).ready(function(){
	// functions
	<?php require('library/js/validator/functions.js');?>
	
	// peralatan
	<?php require('library/js/form/input.peralatan.js');?>
	
	// material
	<?php require('library/js/form/input.material.js');?>
	
	// jenis perawatan
	<?php require('library/js/form/input.jenis_perawatan.js');?>
	
	// VALIDATOR
	// tandan
	<?php require('library/js/validator/form.input.label_tandan.js');?>
	
	// material
	<?php require('library/js/validator/form.input.material.js');?>
	
	// jenis_perawatan
	<?php require('library/js/validator/form.input.jenis_perawatan.js');?>
	
	// peralatan
	<?php require('library/js/validator/form.input.peralatan.js');?>	
	
	// validation config
	<?php require('library/js/validator/config.produksi_perawatan.js');?>	
	
	$('input#tgl_perawatan').datePicker();
});

</script>
<div class="title">Perawatan Biji / Kecambah :: Pencucian</div>

<textarea style="display:none" id="template_jenis_perawatan_item">
	<div class="jenis_perawatan_item">
		<span class="item">{0}</span>
		<span class="close">x</span>
		<input type="hidden" class="jenis_perawatan" name="jenis_perawatan[]" value="{0}" />
	</div>
</textarea>

<textarea style="display:none" id="template_peralatan">
	<li><span>
			<label>{0}</label>
			<input type="text" id="nama_peralatan-{0}" name="nama_peralatan-{0}" class="nama_peralatan"/>
			<input type="text" id="jml_peralatan-{0}" name="jml_peralatan-{0}" class="jumlah_peralatan"/>
			<input type="button" class="hapus_peralatan button"  name="hapus_peralatan" value="Hapus"/>
		</span>
	</li> 
</textarea>
<textarea style="display:none" id="template_material">
	<li><span>
		<label>{0}</label>
		<?=$combobox;?>
		<input type="text" id="jml_material-{0}" name="jml_material-{0}" value="" class="jumlah_material"/>
		<input type="text" id="satuan_material-{0}" name="satuan_material-{0}" value="" class="satuan_material disabled" readonly="readonly"/>
		<input type="text" id="harga_material-{0}"  name="harga_material-{0}" value="" class="harga_material disabled" readonly="readonly"/>
		<input type="button" class="hapus_material button" name="hapus_material" value="Hapus"/>
	</span></li>
</textarea>
<textarea style="display:none" id="template_material_other">
	<li><span>
		<label>{0}</label>
		<input type="text" id="nama_material-{0}" name="nama_material-{0}" value="" class="nama_material"/>
		<input type="text" id="jml_material-{0}" name="jml_material-{0}" value="" class="jumlah_material"/>
		<input type="text" id="satuan_material-{0}" name="satuan_material-{0}" value="" class="satuan_material"/>
		<input type="text" id="harga_material-{0}"  name="harga_material-{0}" value="" class="harga_material"/>
		<input type="button" class="hapus_material" name="hapus_material" value="Hapus"/>
	</span></li>
</textarea>

<form name="frm_<?=$subbagian;?>" id="frm_<?=$subbagian;?>" method="post" action="index.php?bagian=<?=$bagian;?>&subbagian=<?=$subbagian;?>&action=confirm">
    <ul>
    	<li class="header"><span>Perlakuan</span></li>
        <li><span>
            <label>Tanggal Perawatan:</label>
            <input type="text" id="tgl_perawatan" name="tgl_perawatan" value="<?=$current_date;?>" readonly="readonly" class="disabled"/>
        </span></li>
         <li><span>
            <label>Label Tandan:</label>
            <input type="text" id="label_tandan" name="label_tandan" value=""/>
        </span></li>
    </ul>
    <ul>
		<li class="header"><span>Pekerja</span></li>
		<li><span>
            <label>Penanggung Jawab:</label>
            <input type="text" id="penanggung_jawab" name="penanggung_jawab" value=""/>
        </span></li>
		<li><span>
            <label>Jumlah Pekerja:</label>
            <input type="text" id="jml_pekerja" name="jml_pekerja" value=""/>
        </span></li>
		<li><span>
            <label>Total Biaya Pekerja:</label>
            <input type="text" id="biaya_pekerja" name="biaya_pekerja" value=""/>
        </span></li>
    </ul>
    <ul id="peralatan">
		<li class="header"><span>Peralatan</span></li>
		<li class="desc">
			<span class="col1">Nama Peralatan</span>
			<span class="col2">Jumlah</span>
		</li>
	    <li  class="button">
	      <input type="button" name="tambah_peralatan" id="tambah_peralatan" value="Tambah Baris"/>
	    </li>
    </ul>
    <ul>
		<li class="header"><span>Material</span></li>
		<li class="desc">
			<span class="col1">Nama Material</span>
			<span class="col2">Jumlah</span>
			<span class="col3">Satuan</span>
			<span class="col4">Total Harga</span>
		</li>
		<li class="button">
	      <input type="button" name="tambah_material" id="tambah_material" value="Tambah Baris"/>
	    </li>
	</ul>
	<ul>
		<li class="header"><span>Kondisi</span></li>
		<li><span>
			<label>Jenis Perawatan:</label>
            <select name="jenis_perawatan" id="jenis_perawatan" size="5">
				<option value="fertilization">Fertilization</option>
				<option value="path">Path</option>
				<option value="harvesting path">Harvesting Path</option>
				<option value="circle">Circle</option>
				<option value="circle raking">Circle Raking</option>
				<option value="slashing">Slashing</option>
				<option value="spraying">Spraying</option>
				<option value="selective spraying">Selective Spraying</option>
				<option value="lalang spraying">Lalang Spraying</option>
				<option value="construct platform">Construct Platform</option>
				<option value="platform manual">Platform Manual</option>
				<option value="terracing">Terracing</option>
				<option value="pruning">Pruning</option>
				<option value="weeding">Weeding</option>
				<option value="selective weeding">Selective Weeding</option>
				<option value="pest & disesease">Pest &amp; Disesease</option>
				<option value="blocking">Blocking</option>
				<option value="numbering">Numbering</option>
				<option value="ancak tetap">Ancak Tetap</option>	  
			</option>
        </span></li>
		<li><span>			
			<div id="item_container"></div>
		</span></li>
		<li><span>
            <label>Kondisi Awal:</label>
            <select name="kondisi_awal" id="kondisi_awal">
				<option value="sangat_baik">Sangat Baik</option>
				<option value="baik" selected="selected">Baik</option>
				<option value="buruk">Buruk</option>
			</select>
        </span></li>
		<li><span>
            <label>Kondisi Akhir:</label>
            <select name="kondisi_akhir" id="kondisi_akhir">
				<option value="sangat_baik">Sangat Baik</option>
				<option value="baik" selected="selected">Baik</option>
				<option value="buruk">Buruk</option>
			</select>
        </span></li>
		<li><span>
            <label>Catatan:</label>
            <textarea id="catatan" name="catatan"  cols="65" rows="4" ></textarea>
        </span></li>		
    </ul>
	<ul>
		<li class="header"><span>Simpan</span></li>
		<li class="button"><span>
			<input type="submit" name="submit" id="submit" value="Simpan Data" class="simpan"/>
		</span></li>
	</ul>
</form>